import { Opt } from '__com/Opt.js'
import ruleOpt from '@/option/rule.js'
import cityOpt from '@/option/city.js'
export class editOpt extends Opt {
  constructor(fun) {
    super(fun)
  }

  create() {
    return [
      {
        placeholder: '转交前项目所属人',
        text: {
          className: 'info-label-title'
        }
      },
      {
        title: '所属人手机号',
        key: 'lastBelongUserPhone',
        disabled: true,
        col: 20,
        text: {}
      },
      {
        title: '所属人姓名',
        key: 'lastBelongUserName',
        text: {}
      },
      {
        col: 14,
        placeholder: '转交后项目所属人',
        text: {
          className: 'info-label-title'
        }
      },
      {
        title: '所属人手机号码',
        key: 'belongUserPhone',
        group: [
          {
            key: 'belongUserPhone',
            col: 14,
            placeholder: '请输入所属人手机号码',
            input: {
              maxlength: 11
            }
          },
          {
            col: 4,
            button: {
              title: '验证手机号码',
              click: (val) => {
                this.checkPhone()
              }
            }
          }
        ],
        rules: [ruleOpt.phone()]
      },
      {
        title: '确认手机号',
        key: 'phoneVerify',
        disabled: true,
        col: 14,
        input: {
          maxlength: 11
        },
        rules: [ruleOpt.required('确认手机号不能为空')]
      },
      {
        title: '所属人姓名',
        key: 'belongUserName',
        placeholder: '请输入所属人姓名',
        // tips: `<div style='line-height:1;'>该手机号为已注册手机号，<span style='color:red; >请确认人员名称是否一致</span>。您可对人员名称进行修改，修改后人员名称将仅在当前项目（组织）中生效 </div>`,
        input: {
          maxlength: 20
        },
        // change: (val) => {
        //   console.log(val, '项目主体')
        //   this.belongUserNameChange(val.editValue)
        // },
        rules: [ruleOpt.required('所属人姓名不能为空')]
      }
      // {
      //   col: 14,
      //   placeholder: '转交前项目所属人',
      //   text: {
      //     className: 'title'
      //   }
      // },
      // {
      //   title: '变更说明',
      //   key: 'remaks',
      //   input: {
      //     type: 'textarea',
      //     showWordLimit: true,
      //     maxlength: 200,
      //     autosize: {
      //       minRows: 3,
      //       maxRows: 5
      //     }
      //   }
      // }
    ]
  }
}
